<template>
  <header class="header">
    <h1>内卷计划</h1>

    <input type="text" placeholder="请输入你的计划" class="new-todo" v-model="taskName" @keyup.enter="handleAdd" />

    <button class="add" @click="handleAdd">添加Task</button>
  </header>
</template>


<script>

export default {
  data(){
    return {
      taskName:''
    }
  },

  methods:{
    handleAdd(){
      // 
      this.$emit('add',this.taskName)
      this.taskName = ''
    }
  }
}
</script>



<style></style>